/*     */ package src.tfhka;
/*     */ 
/*     */ import java.util.Date;
/*     */ import java.util.GregorianCalendar;
/*     */ 
/*     */ public class S1PrinterData
/*     */ {
/*     */   private int cashierNumber;
/*     */   private double totalDailySales;
/*     */   private int lastInvoiceNumber;
/*     */   private int quantityOfInvoicesToday;
/*     */   private int numberNonFiscalDocuments;
/*     */   private int quantityNonFiscalDocuments;
/*     */   private int dailyClosureCounter;
/*     */   private int auditReportsCounter;
/*     */   private String RIF;
/*     */   private String registeredMachineNumber;
/*     */   private Date currentPrinterDateTime;
/*     */ 
/*     */   public S1PrinterData(String trama)
/*     */   {
/*  37 */     if ((trama != null) && (trama.length() == 88))
/*     */     {
/*  39 */       setCashierNumber(Integer.parseInt(trama.substring(2, 4)));
/*  40 */       double valor = Double.parseDouble(trama.substring(4, 19)) + Double.parseDouble(trama.substring(19, 21)) / 100.0D;
/*  41 */       setTotalDailySales(valor);
/*  42 */       setLastInvoiceNumber(Integer.parseInt(trama.substring(21, 29)));
/*  43 */       setQuantityOfInvoicesToday(Integer.parseInt(trama.substring(29, 34)));
/*  44 */       setNumberNonFiscalDocuments(Integer.parseInt(trama.substring(34, 42)));
/*  45 */       setQuantityNonFiscalDocuments(Integer.parseInt(trama.substring(42, 47)));
/*  46 */       setDailyClosureCounter(Integer.parseInt(trama.substring(47, 51)));
/*  47 */       setAuditReportsCounter(Integer.parseInt(trama.substring(51, 55)));
/*  48 */       setRIF(trama.substring(55, 66));
/*  49 */       setRegisteredMachineNumber(trama.substring(66, 76));
/*     */ 
/*  51 */       String hr = trama.substring(76, 78);
/*  52 */       String mn = trama.substring(78, 80);
/*  53 */       String sg = trama.substring(80, 82);
/*     */ 
/*  55 */       String dd = trama.substring(82, 84);
/*  56 */       String mm = trama.substring(84, 86);
/*  57 */       String aa = trama.substring(86, 88);
/*     */ 
/*  59 */       GregorianCalendar cal = new GregorianCalendar();
/*  60 */       cal.set(Integer.parseInt(aa) + 2000, Integer.parseInt(mm) - 1, Integer.parseInt(dd), Integer.parseInt(hr), Integer.parseInt(mn), Integer.parseInt(sg));
/*     */ 
/*  62 */       setCurrentPrinterDateTime(cal.getTime());
/*     */     }
/*     */   }
/*     */ 
/*     */   public int getCashierNumber() {
/*  67 */     return this.cashierNumber;
/*     */   }
/*     */ 
/*     */   public double getTotalDailySales() {
/*  71 */     return this.totalDailySales;
/*     */   }
/*     */ 
/*     */   public int getLastInvoiceNumber() {
/*  75 */     return this.lastInvoiceNumber;
/*     */   }
/*     */ 
/*     */   public int getQuantityOfInvoicesToday() {
/*  79 */     return this.quantityOfInvoicesToday;
/*     */   }
/*     */ 
/*     */   public int getNumberNonFiscalDocuments() {
/*  83 */     return this.numberNonFiscalDocuments;
/*     */   }
/*     */ 
/*     */   public int getQuantityNonFiscalDocuments() {
/*  87 */     return this.quantityNonFiscalDocuments;
/*     */   }
/*     */ 
/*     */   public int getDailyClosureCounter() {
/*  91 */     return this.dailyClosureCounter;
/*     */   }
/*     */ 
/*     */   public int getAuditReportsCounter() {
/*  95 */     return this.auditReportsCounter;
/*     */   }
/*     */ 
/*     */   public String getRIF() {
/*  99 */     return this.RIF;
/*     */   }
/*     */ 
/*     */   public String getRegisteredMachineNumber() {
/* 103 */     return this.registeredMachineNumber;
/*     */   }
/*     */ 
/*     */   public Date getCurrentPrinterDateTime() {
/* 107 */     return this.currentPrinterDateTime;
/*     */   }
/*     */ 
/*     */   private void setCashierNumber(int cashierNumber) {
/* 111 */     this.cashierNumber = cashierNumber;
/*     */   }
/*     */ 
/*     */   private void setTotalDailySales(double totalDailySales) {
/* 115 */     this.totalDailySales = totalDailySales;
/*     */   }
/*     */ 
/*     */   private void setLastInvoiceNumber(int lastInvoiceNumber) {
/* 119 */     this.lastInvoiceNumber = lastInvoiceNumber;
/*     */   }
/*     */ 
/*     */   private void setQuantityOfInvoicesToday(int quantityOfInvoicesToday) {
/* 123 */     this.quantityOfInvoicesToday = quantityOfInvoicesToday;
/*     */   }
/*     */ 
/*     */   private void setNumberNonFiscalDocuments(int numberNonFiscalDocuments) {
/* 127 */     this.numberNonFiscalDocuments = numberNonFiscalDocuments;
/*     */   }
/*     */ 
/*     */   private void setQuantityNonFiscalDocuments(int quantityNonFiscalDocuments) {
/* 131 */     this.quantityNonFiscalDocuments = quantityNonFiscalDocuments;
/*     */   }
/*     */ 
/*     */   private void setDailyClosureCounter(int dailyClosureCounter) {
/* 135 */     this.dailyClosureCounter = dailyClosureCounter;
/*     */   }
/*     */ 
/*     */   private void setAuditReportsCounter(int auditReportsCounter) {
/* 139 */     this.auditReportsCounter = auditReportsCounter;
/*     */   }
/*     */ 
/*     */   private void setRIF(String RIF) {
/* 143 */     this.RIF = RIF;
/*     */   }
/*     */ 
/*     */   private void setRegisteredMachineNumber(String registeredMachineNumber) {
/* 147 */     this.registeredMachineNumber = registeredMachineNumber;
/*     */   }
/*     */ 
/*     */   private void setCurrentPrinterDateTime(Date currentPrinterDateTime) {
/* 151 */     this.currentPrinterDateTime = currentPrinterDateTime;
/*     */   }
/*     */ }

/* Location:           C:\Users\javaOne\Documents\TfhkaJava.jar
 * Qualified Name:     tfhka.S1PrinterData
 * JD-Core Version:    0.6.2
 */